package main

import (
	"fmt"
	"leetcode"
)

func main() {
	grid := [][]int{
		{0, 0, 0},
		{1, 1, 0},
		{0, 0, 0},
		{0, 1, 1},
		{0, 0, 0},
	}
	k := 1
	// grid = [][]int{
	// 	{0, 1, 1},
	// 	{1, 1, 1},
	// 	{1, 0, 0},
	// }

	grid = [][]int{
		{0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1},
		{0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1},
		{1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0},
		{1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1},
		{1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1},
		{0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1},
		{0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1},
		{1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0},
		{0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0},
		{0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0},
		{0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0},
	}
	k = 27

	grid = [][]int{
		{0, 1, 0, 1},
		{0, 1, 0, 0},
		{0, 0, 1, 0},
		{1, 0, 0, 1},
		{0, 1, 0, 0},
	}
	k = 18

	grid = [][]int{{0, 1, 0, 0, 0, 1, 0, 0}, {0, 1, 0, 1, 0, 1, 0, 1}, {0, 0, 0, 1, 0, 0, 1, 0}}
	k = 1

	r := leetcode.ShortestPath(grid, k)
	fmt.Println(r)
}
